package com.shujia.common_.eight;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

    static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static String dateToStr(Date date) {
        return sdf.format(date);
    }


    public static Date strToDate(String str) throws Exception {
        return sdf.parse(str);
    }

}

